package day1221;

public class Test6 {
    public static void main(String[] args) {
        Month     yue= Month.APRIL;
        int year=4;
        switch (yue){
            case JANUARY: System.out.println(31); break;
            case FEBRUARY:  System.out.println( (year%400==0 ||(year%4==0&&year%100!=0) )?29:28 );break;
            case MARCH: System.out.println(31); break;
            case APRIL: System.out.println(30); break;
            case MAY: System.out.println(31); break;
            case JUNE: System.out.println(30); break;
            case JULY: System.out.println(31); break;
            case AUGUST: System.out.println(31); break;
            case SEPTEMBER: System.out.println(30); break;
            case OCTOBER: System.out.println(31); break;
            case NOVEMBER: System.out.println(30); break;
            case DECEMBER: System.out.println(31); break;
        }
    }
}
